package com.cos.emp.services.impl;

import com.cos.emp.dao.DeptMapper;
import com.cos.emp.entity.Dept;
import com.cos.emp.services.DeptServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author: COS
 * @time: 2022/9/30 16:10
 * @description:
 */
@Service
@Transactional
public class DeptServicesImpl implements DeptServices {
    @Autowired
    private DeptMapper deptMapper;

    @Override
    @Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
    public List<Dept> getAll() {
        return deptMapper.getAll();
    }
}
